package com.rightsidetech.system.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.PageRequest;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.commom.base.TimeQueryRequest;
import com.rightsidetech.system.dtos.request.*;
import com.rightsidetech.system.dtos.request.store.StoreStockReq;
import com.rightsidetech.system.dtos.request.store.SysAgentStorkPageReq;
import com.rightsidetech.system.dtos.request.store.SysAgentStorkReplenishReq;
import com.rightsidetech.system.dtos.response.*;
import com.rightsidetech.system.dtos.response.store.*;
import com.rightsidetech.system.entity.SysStoreReplenishDetails;
import com.rightsidetech.system.entity.SysStoreStock;
import com.rightsidetech.system.entity.store.SysStoreLoginInfo;

import java.util.List;

/**
 * @Author: yhr
 * @Date: 2021-12-08 10:25
 */
public interface SysStoreStorkService {
    ResponseData<PageInfo<SysStoreStorkPageResp>> page(SysStoreStorkPageReq req);

    ResponseData<PageInfo<SysStoreStorkInfoResp>> selectReplenishInfo(SysStoreIdReq req);

    ResponseData<PageInfo<SysStoreStorkReplenishResp>> replenishPage(SysStoreStorkReplenishReq req);

    ResponseData<PageInfo<SysStoreStorkReplenishInfoResp>> replenishInfo(SysStoreStorkReplenishInfoReq req);

    ResponseData<PageInfo<SysStoreStorkReplenishInfoResp>> replenishAgentInfo(SysStoreStorkReplenishInfoReq req,Long loginInfoId);

    ResponseData<PageInfo<SysStoreStorkAppResp>> listAll(PageRequest req,Long loginInfoId);

    ResponseData<PageInfo<SysStoreStorkReplenishAppResp>> listReplenish(Long loginInfoId, Byte verify, TimeQueryRequest timeQueryRequest);

    ResponseData<List<SysStoreStorkDetailsAppResp>> listReplenishInfo(Long id);

    ResponseData<List<HomeStoreStorkResp>> outofStockStore(Long agentInfoId);

    ResponseData updateVerifyById(Long id);

    ResponseData checkVerifyById(Long id);

    void updateVerifyHavedCheckedById(Long id);

    ResponseData<SysVerifyReplenishResp> verifyReplenish(Long loginInfoId);

    ResponseData<PageInfo<SysAgentStorkPageResp>> pageAgent(SysAgentStorkPageReq req,Long loginInfoId);

    ResponseData<PageInfo<SysStoreStorkInfoResp>> selectAgentReplenishInfo(SysStoreIdReq req,Long loginInfoId);

    ResponseData<PageInfo<SysAgentStorkReplenishResp>> replenishAgentPage(SysAgentStorkReplenishReq req, Long loginInfoId);

    ResponseData<PageInfo<SysStoreStorkAppResp>> listAgentAll(StoreStockReq req, Long agentInfoId);

    ResponseData<PageInfo<SysAgentStorkReplenishListResp>> listReplenishAgent(Long agentInfoId, TimeQueryRequest timeQueryRequest) ;

    ResponseData saveStork(AgentAppStoreStorkReq req,Long agentLoginId,Long num);

    ResponseData saveAfterStork(AgentAppStoreStorkReq req,Long agentLoginId,Long num);

    ResponseData updateNum(Long replenishId,Long num);

    int updateStorkNum(Long storeId,Long specsId,Long num);

    AgentRegionResp selectLoginName(Long loginId);

    int insertSelective(SysStoreReplenishDetails req);

    int insertStockSelective(SysStoreStock req);

    ResponseData<List<StoreStorkResp>> storeStorkPage(StoreStorkSearchReq req, Long agentInfoId);

    ResponseData<List<StoreStorkExceedResp>> storeStorkExceed(Long agentInfoId);

    SysStoreStock selectCountStock(Long storeId,Long specsId);

    SysStoreStock selectNoneSpecsStock(Long storeId,Long commodityId);

    ResponseData outStork(Long storeId,Long specsId, Long commodityId,Long num);

    ResponseData retreatStork(Long storeId, Long specsId, Long commodityId, Long num);

    ResponseData delStock(Long id);

    SysStoreStock selectByPrimaryKey(Long id);

    int updateStockNum(Long id,Long num);

    List<SysStoreStorkRemindResp> storeStorkExceedAll();

    List<SysStoreStorkRemindResp> storeStorkAgentLoginId();

//    int updateRemind(Long id);

    ResponseData<List<SysStoreStorkDetailsAppResp>> timeOutStockInfo(Long storeId);

    SysStoreLoginInfo storeLoginInfo(Long loginInfoId);

    ResponseData<List<SysStorkDetailsTimeOutResp>> timeOutStock(Long loginInfoId);

    ResponseData<List<SysStoreStorkDetailsAppResp>> timeOutDetails(Long storeId);

    Long findStoreCurrentStock(Long storeId);

    Long findConfirmStock(Long storeId);

    void outTimeStatis();

    Long findExpiredNum(Long stockId);

    List<Long> selectCommoditySpecsIdByStoreId(Long storeId);
}
